package com.ljl.yishu.ui;

import android.os.Bundle;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.view.MenuItem;
import com.ljl.yishu.R;

/**
 * Created by Administrator on 2014/8/21.
 */
public class LoginIndex extends BaseActivity {
    private ActionBar mActionBar;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login_index);
        mActionBar = getSupportActionBar();
        mActionBar.setBackgroundDrawable((getResources().getDrawable(R.color.theme)));

        mActionBar.setHomeButtonEnabled(true);
        mActionBar.setDisplayHomeAsUpEnabled(true);
        //隐藏Title
        mActionBar.setDisplayShowTitleEnabled(true);
        //隐藏Home logo


        mActionBar.setDisplayShowHomeEnabled(true);
        //设置ActionBar的导航模式为Tab


//        mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish();
                this.overridePendingTransition(R.anim.new_dync_in_from_right,R.anim.new_dync_out_to_left);
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }
}